home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat3 / Tk / text.z / text
Text File  |  1998-10-30  |  96KB  |  1,585 lines

  1.  
  2.  
  3.  
  4. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      text - Create and manipulate text widgets
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      tttteeeexxxxtttt _p_a_t_h_N_a_m_e ?_o_p_t_i_o_n_s?
  13.  
  14. SSSSTTTTAAAANNNNDDDDAAAARRRRDDDD OOOOPPPPTTTTIIIIOOOONNNNSSSS
  15.      bbbbaaaacccckkkkggggrrrroooouuuunnnndddd       hhhhiiiigggghhhhlllliiiigggghhhhttttBBBBaaaacccckkkkggggrrrroooouuuunnnndddd  iiiinnnnsssseeeerrrrttttOOOOnnnnTTTTiiiimmmmeeee      sssseeeelllleeeeccccttttBBBBoooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh|
  16.      bbbboooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh      hhhhiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr       iiiinnnnsssseeeerrrrttttWWWWiiiiddddtttthhhh       sssseeeelllleeeeccccttttFFFFoooorrrreeeeggggrrrroooouuuunnnndddd |
  17.      ccccuuuurrrrssssoooorrrr           hhhhiiiigggghhhhlllliiiigggghhhhttttTTTThhhhiiiicccckkkknnnneeeessssssss   ppppaaaaddddXXXX              sssseeeettttGGGGrrrriiiidddd          |
  18.      eeeexxxxppppoooorrrrttttSSSSeeeelllleeeeccccttttiiiioooonnnn  iiiinnnnsssseeeerrrrttttBBBBaaaacccckkkkggggrrrroooouuuunnnndddd     ppppaaaaddddYYYY              ttttaaaakkkkeeeeFFFFooooccccuuuussss        |
  19.      ffffoooonnnntttt             iiiinnnnsssseeeerrrrttttBBBBoooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh    rrrreeeelllliiiieeeeffff            xxxxSSSSccccrrrroooollllllllCCCCoooommmmmmmmaaaannnndddd
  20.      ffffoooorrrreeeeggggrrrroooouuuunnnndddd       iiiinnnnsssseeeerrrrttttOOOOffffffffTTTTiiiimmmmeeee        sssseeeelllleeeeccccttttBBBBaaaacccckkkkggggrrrroooouuuunnnndddd  yyyySSSSccccrrrroooollllllllCCCCoooommmmmmmmaaaannnndddd
  21.  
  22.      See the ``options'' manual entry for details on the standard options.
  23.  
  24. WWWWIIIIDDDDGGGGEEEETTTT----SSSSPPPPEEEECCCCIIIIFFFFIIIICCCC OOOOPPPPTTTTIIIIOOOONNNNSSSS
  25.      Name:           hhhheeeeiiiigggghhhhtttt
  26.      Class:          HHHHeeeeiiiigggghhhhtttt
  27.      Command-Line Switch:----hhhheeeeiiiigggghhhhtttt
  28.  
  29.           Specifies the desired height for the window, in units of characters.
  30.           Must be at least one.
  31.  
  32.      Name:           ssssppppaaaacccciiiinnnngggg1111                                                 |
  33.      Class:          SSSSppppaaaacccciiiinnnngggg1111                                                 |
  34.      Command-Line Switch:----ssssppppaaaacccciiiinnnngggg1111                                            |
  35.  
  36.           Requests additional space above each text line in the widget, using |
  37.           any of the standard forms for screen distances.  If a line wraps,   |
  38.           this option only applies to the first line on the display.  This    |
  39.           option may be overriden with ----ssssppppaaaacccciiiinnnngggg1111 options in tags.
  40.  
  41.      Name:           ssssppppaaaacccciiiinnnngggg2222                                                 |
  42.      Class:          SSSSppppaaaacccciiiinnnngggg2222                                                 |
  43.      Command-Line Switch:----ssssppppaaaacccciiiinnnngggg2222                                            |
  44.  
  45.           For lines that wrap (so that they cover more than one line on the   |
  46.           display) this option specifies additional space to provide between  |
  47.           the display lines that represent a single line of text.  The value  |
  48.           may have any of the standard forms for screen distances.  This      |
  49.           option may be overriden with ----ssssppppaaaacccciiiinnnngggg2222 options in tags.
  50.  
  51.      Name:           ssssppppaaaacccciiiinnnngggg3333                                                 |
  52.      Class:          SSSSppppaaaacccciiiinnnngggg3333                                                 |
  53.      Command-Line Switch:----ssssppppaaaacccciiiinnnngggg3333                                            |
  54.  
  55.           Requests additional space below each text line in the widget, using |
  56.           any of the standard forms for screen distances.  If a line wraps,   |
  57.           this option only applies to the last line on the display.  This     |
  58.           option may be overriden with ----ssssppppaaaacccciiiinnnngggg3333 options in tags.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  71.  
  72.  
  73.  
  74.      Name:           ssssttttaaaatttteeee
  75.      Class:          SSSSttttaaaatttteeee
  76.      Command-Line Switch:----ssssttttaaaatttteeee
  77.  
  78.           Specifies one of two states for the text:  nnnnoooorrrrmmmmaaaallll or ddddiiiissssaaaabbbblllleeeedddd.  If
  79.           the text is disabled then characters may not be inserted or deleted
  80.           and no insertion cursor will be displayed, even if the input focus
  81.           is in the widget.
  82.  
  83.      Name:           ttttaaaabbbbssss                                                     |
  84.      Class:          TTTTaaaabbbbssss                                                     |
  85.      Command-Line Switch:----ttttaaaabbbbssss                                                |
  86.  
  87.           Specifies a set of tab stops for the window.  The option's value    |
  88.           consists of a list of screen distances giving the positions of the  |
  89.           tab stops.  Each position may optionally be followed in the next    |
  90.           list element by one of the keywords lllleeeefffftttt, rrrriiiigggghhhhtttt, cccceeeennnntttteeeerrrr, or nnnnuuuummmmeeeerrrriiiicccc,|
  91.           which specifies how to justify text relative to the tab stop.  LLLLeeeefffftttt |
  92.           is the default; it causes the text following the tab character to be|
  93.           positioned with its left edge at the tab position.  RRRRiiiigggghhhhtttt means that|
  94.           the right edge of the text following the tab character is positioned|
  95.           at the tab position, and cccceeeennnntttteeeerrrr means that the text is centered at  |
  96.           the tab position.  NNNNuuuummmmeeeerrrriiiicccc means that the decimal point in the text |
  97.           is positioned at the tab position;  if there is no decimal point    |
  98.           then the least significant digit of the number is positioned just to|
  99.           the left of the tab position;  if there is no number in the text    |
  100.           then the text is right-justified at the tab position.  For example, |
  101.           ----ttttaaaabbbbssss {{{{2222cccc lllleeeefffftttt 4444cccc 6666cccc cccceeeennnntttteeeerrrr}}}} creates three tab stops at two-        |
  102.           centimeter intervals;  the first two use left justification and the |
  103.           third uses center justification.  If the list of tab stops does not |
  104.           have enough elements to cover all of the tabs in a text line, then  |
  105.           Tk extrapolates new tab stops using the spacing and alignment from  |
  106.           the last tab stop in the list.  The value of the ttttaaaabbbbssss option may be |
  107.           overridden by ----ttttaaaabbbbssss options in tags.  If no ----ttttaaaabbbbssss option is         |
  108.           specified, or if it is specified as an empty list, then Tk uses     |
  109.           default tabs spaced every eight (average size) characters.
  110.  
  111.      Name:           wwwwiiiiddddtttthhhh
  112.      Class:          WWWWiiiiddddtttthhhh
  113.      Command-Line Switch:----wwwwiiiiddddtttthhhh
  114.  
  115.           Specifies the desired width for the window in units of characters.
  116.           If the font doesn't have a uniform width then the width of the
  117.           character ``0'' is used in translating from character units to
  118.           screen units.
  119.  
  120.      Name:           wwwwrrrraaaapppp
  121.      Class:          WWWWrrrraaaapppp
  122.      Command-Line Switch:----wwwwrrrraaaapppp
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  137.  
  138.  
  139.  
  140.           Specifies how to handle lines in the text that are too long to be
  141.           displayed in a single line of the text's window.  The value must be
  142.           nnnnoooonnnneeee or cccchhhhaaaarrrr or wwwwoooorrrrdddd.  A wrap mode of nnnnoooonnnneeee means that each line of
  143.           text appears as exactly one line on the screen;  extra characters
  144.           that don't fit on the screen are not displayed.  In the other modes
  145.           each line of text will be broken up into several screen lines if
  146.           necessary to keep all the characters visible.  In cccchhhhaaaarrrr mode a screen
  147.           line break may occur after any character; in wwwwoooorrrrdddd mode a line break
  148.           will only be made at word boundaries.
  149.  
  150.  
  151. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  152.      The tttteeeexxxxtttt command creates a new window (given by the _p_a_t_h_N_a_m_e argument)
  153.      and makes it into a text widget.  Additional options, described above,
  154.      may be specified on the command line or in the option database to
  155.      configure aspects of the text such as its default background color and
  156.      relief.  The tttteeeexxxxtttt command returns the path name of the new window.
  157.  
  158.      A text widget displays one or more lines of text and allows that text to
  159.      be edited.  Text widgets support three different kinds of annotations on
  160.      the text, called tags, marks, and embedded windows.  Tags allow different
  161.      portions of the text to be displayed with different fonts and colors.  In
  162.      addition, Tcl commands can be associated with tags so that scripts are
  163.      invoked when particular actions such as keystrokes and mouse button
  164.      presses occur in particular ranges of the text.  See TAGS below for more
  165.      details.
  166.  
  167.      The second form of annotation consists of marks, which are floating
  168.      markers in the text.  Marks are used to keep track of various interesting
  169.      positions in the text as it is edited.  See MARKS below for more details.
  170.  
  171.      The third form of annotation allows arbitrary windows to be embedded in a
  172.      text widget.  See EMBEDDED WINDOWS below for more details.
  173.  
  174.  
  175. IIIINNNNDDDDIIIICCCCEEEESSSS
  176.      Many of the widget commands for texts take one or more indices as
  177.      arguments.  An index is a string used to indicate a particular place
  178.      within a text, such as a place to insert characters or one endpoint of a
  179.      range of characters to delete.  Indices have the syntax
  180.  
  181.           _b_a_s_e _m_o_d_i_f_i_e_r _m_o_d_i_f_i_e_r _m_o_d_i_f_i_e_r ...
  182.  
  183.      Where _b_a_s_e gives a starting point and the _m_o_d_i_f_i_e_rs adjust the index from
  184.      the starting point (e.g. move forward or backward one character).  Every
  185.      index must contain a _b_a_s_e, but the _m_o_d_i_f_i_e_rs are optional.
  186.  
  187.      The _b_a_s_e for an index must have one of the following forms:
  188.  
  189.      _l_i_n_e...._c_h_a_r   Indicates _c_h_a_r'th character on line _l_i_n_e.  Lines are numbered
  190.                  from 1 for consistency with other UNIX programs that use this
  191.                  numbering scheme.  Within a line, characters are numbered
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  203.  
  204.  
  205.  
  206.                  from 0.
  207.  
  208.      @@@@_x,,,,_y        Indicates the character that covers the pixel whose x and y
  209.                  coordinates within the text's window are _x and _y.
  210.  
  211.      eeeennnndddd         Indicates the end of the text (the character just after the  |
  212.                  last newline).
  213.  
  214.      _m_a_r_k        Indicates the character just after the mark whose name is
  215.                  _m_a_r_k.
  216.  
  217.      _t_a_g....ffffiiiirrrrsssstttt   Indicates the first character in the text that has been
  218.                  tagged with _t_a_g.  This form generates an error if no
  219.                  characters are currently tagged with _t_a_g.
  220.  
  221.      _t_a_g....llllaaaasssstttt    Indicates the character just after the last one in the text
  222.                  that has been tagged with _t_a_g.  This form generates an error
  223.                  if no characters are currently tagged with _t_a_g.
  224.  
  225.      _p_a_t_h_N_a_m_e    Indicates the position of the embedded window whose name is  |
  226.                  _p_a_t_h_N_a_m_e.  This form generates an error if there is no       |
  227.                  embedded window by the given name.
  228.  
  229.      If modifiers follow the base index, each one of them must have one of the
  230.      forms listed below.  Keywords such as cccchhhhaaaarrrrssss and wwwwoooorrrrddddeeeennnndddd may be
  231.      abbreviated as long as the abbreviation is unambiguous.
  232.  
  233.      ++++ _c_o_u_n_t cccchhhhaaaarrrrssss
  234.           Adjust the index forward by _c_o_u_n_t characters, moving to later lines
  235.           in the text if necessary.  If there are fewer than _c_o_u_n_t characters
  236.           in the text after the current index, then set the index to the last
  237.           character in the text.  Spaces on either side of _c_o_u_n_t are optional.
  238.  
  239.      ---- _c_o_u_n_t cccchhhhaaaarrrrssss
  240.           Adjust the index backward by _c_o_u_n_t characters, moving to earlier
  241.           lines in the text if necessary.  If there are fewer than _c_o_u_n_t
  242.           characters in the text before the current index, then set the index
  243.           to the first character in the text.  Spaces on either side of _c_o_u_n_t
  244.           are optional.
  245.  
  246.      ++++ _c_o_u_n_t lllliiiinnnneeeessss
  247.           Adjust the index forward by _c_o_u_n_t lines, retaining the same
  248.           character position within the line.  If there are fewer than _c_o_u_n_t
  249.           lines after the line containing the current index, then set the
  250.           index to refer to the same character position on the last line of
  251.           the text.  Then, if the line is not long enough to contain a
  252.           character at the indicated character position, adjust the character
  253.           position to refer to the last character of the line (the newline).
  254.           Spaces on either side of _c_o_u_n_t are optional.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  269.  
  270.  
  271.  
  272.      ---- _c_o_u_n_t lllliiiinnnneeeessss
  273.           Adjust the index backward by _c_o_u_n_t lines, retaining the same
  274.           character position within the line.  If there are fewer than _c_o_u_n_t
  275.           lines before the line containing the current index, then set the
  276.           index to refer to the same character position on the first line of
  277.           the text.  Then, if the line is not long enough to contain a
  278.           character at the indicated character position, adjust the character
  279.           position to refer to the last character of the line (the newline).
  280.           Spaces on either side of _c_o_u_n_t are optional.
  281.  
  282.      lllliiiinnnneeeessssttttaaaarrrrtttt
  283.           Adjust the index to refer to the first character on the line.
  284.  
  285.      lllliiiinnnneeeeeeeennnndddd
  286.           Adjust the index to refer to the last character on the line (the
  287.           newline).
  288.  
  289.      wwwwoooorrrrddddssssttttaaaarrrrtttt
  290.           Adjust the index to refer to the first character of the word
  291.           containing the current index.  A word consists of any number of
  292.           adjacent characters that are letters, digits, or underscores, or a
  293.           single character that is not one of these.
  294.  
  295.      wwwwoooorrrrddddeeeennnndddd
  296.           Adjust the index to refer to the character just after the last one
  297.           of the word containing the current index.  If the current index
  298.           refers to the last character of the text then it is not modified.
  299.  
  300.      If more than one modifier is present then they are applied in left-to-
  301.      right order.  For example, the index ``eeeennnndddd ---- 1111 cccchhhhaaaarrrrssss'' refers to the
  302.      next-to-last character in the text and ``iiiinnnnsssseeeerrrrtttt wwwwoooorrrrddddssssttttaaaarrrrtttt ---- 1111 cccc'' refers
  303.      to the character just before the first one in the word containing the
  304.      insertion cursor.
  305.  
  306.  
  307. TTTTAAAAGGGGSSSS
  308.      The first form of annotation in text widgets is a tag.  A tag is a
  309.      textual string that is associated with some of the characters in a text.
  310.      Tags may contain arbitrary characters, but it is probably best to avoid
  311.      using the the characters `` '' (space), ++++, or ----:  these characters have
  312.      special meaning in indices, so tags containing them can't be used as
  313.      indices.  There may be any number of tags associated with characters in a
  314.      text.  Each tag may refer to a single character, a range of characters,
  315.      or several ranges of characters.  An individual character may have any
  316.      number of tags associated with it.
  317.  
  318.      A priority order is defined among tags, and this order is used in
  319.      implementing some of the tag-related functions described below.  When a
  320.      tag is defined (by associating it with characters or setting its display
  321.      options or binding commands to it), it is given a priority higher than
  322.      any existing tag.  The priority order of tags may be redefined using the
  323.      ``_p_a_t_h_N_a_m_e ttttaaaagggg rrrraaaaiiiisssseeee'' and ``_p_a_t_h_N_a_m_e ttttaaaagggg lllloooowwwweeeerrrr'' widget commands.
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  335.  
  336.  
  337.  
  338.      Tags serve three purposes in text widgets.  First, they control the way
  339.      information is displayed on the screen.  By default, characters are
  340.      displayed as determined by the bbbbaaaacccckkkkggggrrrroooouuuunnnndddd, ffffoooonnnntttt, and ffffoooorrrreeeeggggrrrroooouuuunnnndddd options
  341.      for the text widget.  However, display options may be associated with
  342.      individual tags using the ``_p_a_t_h_N_a_m_e ttttaaaagggg ccccoooonnnnffffiiiigggguuuurrrreeee'' widget command.  If
  343.      a character has been tagged, then the display options associated with the
  344.      tag override the default display style.  The following options are
  345.      currently supported for tags:
  346.  
  347.      ----bbbbaaaacccckkkkggggrrrroooouuuunnnndddd _c_o_l_o_r
  348.           _C_o_l_o_r specifies the background color to use for characters
  349.           associated with the tag.  It may have any of the forms accepted by
  350.           TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrr.
  351.  
  352.      ----bbbbggggssssttttiiiipppppppplllleeee _b_i_t_m_a_p
  353.           _B_i_t_m_a_p specifies a bitmap that is used as a stipple pattern for the
  354.           background.  It may have any of the forms accepted by TTTTkkkk____GGGGeeeettttBBBBiiiittttmmmmaaaapppp.
  355.           If _b_i_t_m_a_p hasn't been specified, or if it is specified as an empty
  356.           string, then a solid fill will be used for the background.
  357.  
  358.      ----bbbboooorrrrddddeeeerrrrwwwwiiiiddddtttthhhh _p_i_x_e_l_s
  359.           _P_i_x_e_l_s specifies the width of a 3-D border to draw around the
  360.           background.  It may have any of the forms accepted by TTTTkkkk____GGGGeeeettttPPPPiiiixxxxeeeellllssss.
  361.           This option is used in conjunction with the ----rrrreeeelllliiiieeeeffff option to give a
  362.           3-D appearance to the background for characters; it is ignored
  363.           unless the ----bbbbaaaacccckkkkggggrrrroooouuuunnnndddd option has been set for the tag.
  364.  
  365.      ----ffffggggssssttttiiiipppppppplllleeee _b_i_t_m_a_p
  366.           _B_i_t_m_a_p specifies a bitmap that is used as a stipple pattern when
  367.           drawing text and other foreground information such as underlines.
  368.           It may have any of the forms accepted by TTTTkkkk____GGGGeeeettttBBBBiiiittttmmmmaaaapppp.  If _b_i_t_m_a_p
  369.           hasn't been specified, or if it is specified as an empty string,
  370.           then a solid fill will be used.
  371.  
  372.      ----ffffoooonnnntttt _f_o_n_t_N_a_m_e
  373.           _F_o_n_t_N_a_m_e is the name of a font to use for drawing characters.  It
  374.           may have any of the forms accepted by TTTTkkkk____GGGGeeeettttFFFFoooonnnnttttSSSSttttrrrruuuucccctttt.
  375.  
  376.      ----ffffoooorrrreeeeggggrrrroooouuuunnnndddd _c_o_l_o_r
  377.           _C_o_l_o_r specifies the color to use when drawing text and other
  378.           foreground information such as underlines.  It may have any of the
  379.           forms accepted by TTTTkkkk____GGGGeeeettttCCCCoooolllloooorrrr.
  380.  
  381.      ----jjjjuuuussssttttiiiiffffyyyy _j_u_s_t_i_f_y
  382.           If the first character of a display line has a tag for which this   |
  383.           option has been specified, then _j_u_s_t_i_f_y determines how to justify   |
  384.           the line.  It must be one of lllleeeefffftttt, rrrriiiigggghhhhtttt, or cccceeeennnntttteeeerrrr.  If a line     |
  385.           wraps, then the justification for each line on the display is       |
  386.           determined by the first character of that display line.
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  401.  
  402.  
  403.  
  404.      ----llllmmmmaaaarrrrggggiiiinnnn1111 _p_i_x_e_l_s
  405.           If the first character of a text line has a tag for which this      |
  406.           option has been specified, then _p_i_x_e_l_s specifies how much the line  |
  407.           should be indented from the left edge of the window.  _P_i_x_e_l_s may    |
  408.           have any of the standard forms for screen distances.  If a line of  |
  409.           text wraps, this option only applies to the first line on the       |
  410.           display;  the ----llllmmmmaaaarrrrggggiiiinnnn2222 option controls the indentation for         |
  411.           subsequent lines.
  412.  
  413.      ----llllmmmmaaaarrrrggggiiiinnnn2222 _p_i_x_e_l_s
  414.           If the first character of a display line has a tag for which this   |
  415.           option has been specified, and if the display line is not the first |
  416.           for its text line (i.e., the text line has wrapped), then _p_i_x_e_l_s    |
  417.           specifies how much the line should be indented from the left edge of|
  418.           the window.  _P_i_x_e_l_s may have any of the standard forms for screen   |
  419.           distances.  This option is only used when wrapping is enabled, and  |
  420.           it only applies to the second and later display lines for a text    |
  421.           line.
  422.  
  423.      ----ooooffffffffsssseeeetttt _p_i_x_e_l_s
  424.           _P_i_x_e_l_s specifies an amount by which the text's baseline should be   |
  425.           offset vertically from the baseline of the overall line, in pixels. |
  426.           For example, a positive offset can be used for superscripts and a   |
  427.           negative offset can be used for subscripts.  _P_i_x_e_l_s may have any of |
  428.           the standard forms for screen distances.
  429.  
  430.      ----oooovvvveeeerrrrssssttttrrrriiiikkkkeeee _b_o_o_l_e_a_n
  431.           Specifies whether or not to draw a horizontal rule through the      |
  432.           middle of characters.  _B_o_o_l_e_a_n may have any of the forms accepted by|
  433.           TTTTkkkk____GGGGeeeettttBBBBoooooooolllleeeeaaaannnn.
  434.  
  435.      ----rrrreeeelllliiiieeeeffff _r_e_l_i_e_f
  436.           _R_e_l_i_e_f specifies the 3-D relief to use for drawing backgrounds, in
  437.           any of the forms accepted by TTTTkkkk____GGGGeeeettttRRRReeeelllliiiieeeeffff.  This option is used in
  438.           conjunction with the ----bbbboooorrrrddddeeeerrrrwwwwiiiiddddtttthhhh option to give a 3-D appearance to
  439.           the background for characters; it is ignored unless the ----bbbbaaaacccckkkkggggrrrroooouuuunnnndddd
  440.           option has been set for the tag.
  441.  
  442.      ----rrrrmmmmaaaarrrrggggiiiinnnn _p_i_x_e_l_s
  443.           If the first character of a display line has a tag for which this   |
  444.           option has been specified, then _p_i_x_e_l_s specifies how wide a margin  |
  445.           to leave between the end of the line and the right edge of the      |
  446.           window.  _P_i_x_e_l_s may have any of the standard forms for screen       |
  447.           distances.  This option is only used when wrapping is enabled.  If a|
  448.           text line wraps, the right margin for each line on the display is   |
  449.           determined by the first character of that display line.
  450.  
  451.      ----ssssppppaaaacccciiiinnnngggg1111 _p_i_x_e_l_s
  452.           _P_i_x_e_l_s specifies how much additional space should be left above each|
  453.           text line, using any of the standard forms for screen distances.  If|
  454.           a line wraps, this option only applies to the first line on the     |
  455.           display.
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  467.  
  468.  
  469.  
  470.      ----ssssppppaaaacccciiiinnnngggg2222 _p_i_x_e_l_s
  471.           For lines that wrap, this option specifies how much additional space|
  472.           to leave between the display lines for a single text line.  _P_i_x_e_l_s  |
  473.           may have any of the standard forms for screen distances.
  474.  
  475.      ----ssssppppaaaacccciiiinnnngggg3333 _p_i_x_e_l_s
  476.           _P_i_x_e_l_s specifies how much additional space should be left below each|
  477.           text line, using any of the standard forms for screen distances.  If|
  478.           a line wraps, this option only applies to the last line on the      |
  479.           display.
  480.  
  481.      ----ttttaaaabbbbssss _t_a_b_L_i_s_t
  482.           _T_a_b_L_i_s_t specifies a set of tab stops in the same form as for the    |
  483.           ----ttttaaaabbbbssss option for the text widget.  This option only applies to a    |
  484.           display line if it applies to the first character on that display   |
  485.           line.  If this option is specified as an empty string, it cancels   |
  486.           the option, leaving it unspecified for the tag (the default).  If   |
  487.           the option is specified as a non-empty string that is an empty list,|
  488.           such as ----ttttaaaaggggssss {{{{ }}}}, then it requests default 8-character tabs as     |
  489.           described for the ttttaaaaggggssss widget option.
  490.  
  491.      ----uuuunnnnddddeeeerrrrlllliiiinnnneeee _b_o_o_l_e_a_n
  492.           _B_o_o_l_e_a_n specifies whether or not to draw an underline underneath
  493.           characters.  It may have any of the forms accepted by TTTTkkkk____GGGGeeeettttBBBBoooooooolllleeeeaaaannnn.
  494.  
  495.      ----wwwwrrrraaaapppp _m_o_d_e
  496.           _M_o_d_e specifies how to handle lines that are wider than the text's   |
  497.           window.  It has the same legal values as the ----wwwwrrrraaaapppp option for the   |
  498.           text widget:  nnnnoooonnnneeee, cccchhhhaaaarrrr, or wwwwoooorrrrdddd.  If this tag option is specified,|
  499.           it overrides the ----wwwwrrrraaaapppp option for the text widget.
  500.  
  501.      If a character has several tags associated with it, and if their display
  502.      options conflict, then the options of the highest priority tag are used.
  503.      If a particular display option hasn't been specified for a particular
  504.      tag, or if it is specified as an empty string, then that option will
  505.      never be used;  the next-highest-priority tag's option will used instead.
  506.      If no tag specifies a particular display option, then the default style
  507.      for the widget will be used.
  508.  
  509.      The second purpose for tags is event bindings.  You can associate
  510.      bindings with a tag in much the same way you can associate bindings with
  511.      a widget class:  whenever particular X events occur on characters with
  512.      the given tag, a given Tcl command will be executed.  Tag bindings can be
  513.      used to give behaviors to ranges of characters; among other things, this
  514.      allows hypertext-like features to be implemented.  For details, see the
  515.      description of the ttttaaaagggg bbbbiiiinnnndddd widget command below.
  516.  
  517.      The third use for tags is in managing the selection.  See THE SELECTION
  518.      below.
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  533.  
  534.  
  535.  
  536. MMMMAAAARRRRKKKKSSSS
  537.      The second form of annotation in text widgets is a mark.  Marks are used
  538.      for remembering particular places in a text.  They are something like
  539.      tags, in that they have names and they refer to places in the file, but a
  540.      mark isn't associated with particular characters.  Instead, a mark is
  541.      associated with the gap between two characters.  Only a single position
  542.      may be associated with a mark at any given time.  If the characters
  543.      around a mark are deleted the mark will still remain;  it will just have
  544.      new neighbor characters.  In contrast, if the characters containing a tag
  545.      are deleted then the tag will no longer have an association with
  546.      characters in the file.  Marks may be manipulated with the ``_p_a_t_h_N_a_m_e
  547.      mmmmaaaarrrrkkkk'' widget command, and their current locations may be determined by
  548.      using the mark name as an index in widget commands.
  549.  
  550.      Each mark also has a _g_r_a_v_i_t_y, which is either lllleeeefffftttt or rrrriiiigggghhhhtttt.  The gravity|
  551.      for a mark specifies what happens to the mark when text is inserted at   |
  552.      the point of the mark.  If a mark has left gravity, then the mark is     |
  553.      treated as if it were attached to the character on its left, so the mark |
  554.      will remain to the left of any text inserted at the mark position.  If   |
  555.      the mark has right gravity, new text inserted at the mark position will  |
  556.      appear to the right of the mark.  The gravity for a mark defaults to     |
  557.      rrrriiiigggghhhhtttt.
  558.  
  559.      The name space for marks is different from that for tags:  the same name
  560.      may be used for both a mark and a tag, but they will refer to different
  561.      things.
  562.  
  563.      Two marks have special significance.  First, the mark iiiinnnnsssseeeerrrrtttt is
  564.      associated with the insertion cursor, as described under THE INSERTION
  565.      CURSOR below.  Second, the mark ccccuuuurrrrrrrreeeennnntttt is associated with the character
  566.      closest to the mouse and is adjusted automatically to track the mouse
  567.      position and any changes to the text in the widget (one exception:
  568.      ccccuuuurrrrrrrreeeennnntttt is not updated in response to mouse motions if a mouse button is
  569.      down;  the update will be deferred until all mouse buttons have been
  570.      released).  Neither of these special marks may be deleted.
  571.  
  572.  
  573. EEEEMMMMBBBBEEEEDDDDDDDDEEEEDDDD WWWWIIIINNNNDDDDOOOOWWWWSSSS
  574.      The third form of annotation in text widgets is an embedded window.  Each|
  575.      embedded window annotation causes a window to be displayed at a          |
  576.      particular point in  the text.  There may be any number of embedded      |
  577.      windows in a text widget, and any widget may be used as an embedded      |
  578.      window (subject to the usual rules for geometry management, which require|
  579.      the text window to be the parent of the embedded window or a descendant  |
  580.      of its parent).  The embedded window's position on the screen will be    |
  581.      updated as the text is modified or scrolled, and it will be mapped and   |
  582.      unmapped as it moves into and out of the visible area of the text widget.|
  583.      Each embedded window occupies one character's worth of index space in the|
  584.      text widget, and it may be referred to either by the name of its embedded|
  585.      window or by its position in the widget's index space.  If the range of  |
  586.      text containing the embedded window is deleted then the window is        |
  587.      destroyed.                                                               |
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  599.  
  600.  
  601.  
  602.      When an embedded window is added to a text widget with the wwwwiiiinnnnddddoooowwww ccccrrrreeeeaaaatttteeee |
  603.      widget command, several configuration options may be associated with it. |
  604.      These options may be  modified later with the wwwwiiiinnnnddddoooowwww ccccoooonnnnffffiiiigggguuuurrrreeee widget    |
  605.      command.  The following options are currently supported:
  606.  
  607.      ----aaaalllliiiiggggnnnn _w_h_e_r_e
  608.           If the window is not as tall as the line in which it is displayed,  |
  609.           this option determines where the window is displayed in the line.   |
  610.           _W_h_e_r_e must have one of the values ttttoooopppp (align the top of the window  |
  611.           with the top of the line), cccceeeennnntttteeeerrrr (center the window within the     |
  612.           range of the line), bbbboooottttttttoooommmm (align the bottom of the window with the |
  613.           bottom of the line's area), or bbbbaaaasssseeeelllliiiinnnneeee (align the bottom of the    |
  614.           window with the baseline of the line).
  615.  
  616.      ----ccccrrrreeeeaaaatttteeee _s_c_r_i_p_t
  617.           Specifies a Tcl script that may be evaluated to create the window   |
  618.           for the annotation.  If no ----wwwwiiiinnnnddddoooowwww option has been specified for the|
  619.           annotation this script will be evaluated when the annotation is     |
  620.           about to be displayed on the screen.  _S_c_r_i_p_t must create a window   |
  621.           for the annotation and return the name of that window as its result.|
  622.           If the annotation's window should ever be deleted, _s_c_r_i_p_t will be   |
  623.           evaluated again the next time the annotation is displayed.
  624.  
  625.      ----ppppaaaaddddxxxx _p_i_x_e_l_s
  626.           _P_i_x_e_l_s specifies the amount of extra space to leave on each side of |
  627.           the embedded window.  It may have any of the usual forms defined for|
  628.           a screen distance.
  629.  
  630.      ----ppppaaaaddddyyyy _p_i_x_e_l_s
  631.           _P_i_x_e_l_s specifies the amount of extra space to leave on the top and  |
  632.           on the bottom of the embedded window.  It may have any of the usual |
  633.           forms defined for a screen distance.
  634.  
  635.      ----ssssttttrrrreeeettttcccchhhh _b_o_o_l_e_a_n
  636.           If the requested height of the embedded window is less than the     |
  637.           height of the line in which it is displayed, this option can be used|
  638.           to specify whether the window should be stretched vertically to fill|
  639.           its line.  If the ----ppppaaaaddddyyyy option has been specified as well, then the |
  640.           requested padding will be retained even if the window is stretched.
  641.  
  642.      ----wwwwiiiinnnnddddoooowwww _p_a_t_h_N_a_m_e
  643.           Specifies the name of a window to display in the annotation.        |
  644.  
  645.  
  646. TTTTHHHHEEEE SSSSEEEELLLLEEEECCCCTTTTIIIIOOOONNNN
  647.      Text widgets support the standard X selection.  Selection support is
  648.      implemented via tags.  If the eeeexxxxppppoooorrrrttttSSSSeeeelllleeeeccccttttiiiioooonnnn option for the text widget
  649.      is true then the sssseeeellll tag will be associated with the selection:
  650.  
  651.      [1]  Whenever characters are tagged with sssseeeellll the text widget will claim
  652.           ownership of the selection.
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  665.  
  666.  
  667.  
  668.      [2]  Attempts to retrieve the selection will be serviced by the text
  669.           widget, returning all the characters with the sssseeeellll tag.
  670.  
  671.      [3]  If the selection is claimed away by another application or by
  672.           another window within this application, then the sssseeeellll tag will be
  673.           removed from all characters in the text.
  674.  
  675.      The sssseeeellll tag is automatically defined when a text widget is created, and
  676.      it may not be deleted with the ``_p_a_t_h_N_a_m_e ttttaaaagggg ddddeeeelllleeeetttteeee'' widget command.
  677.      Furthermore, the sssseeeelllleeeeccccttttBBBBaaaacccckkkkggggrrrroooouuuunnnndddd, sssseeeelllleeeeccccttttBBBBoooorrrrddddeeeerrrrWWWWiiiiddddtttthhhh, and
  678.      sssseeeelllleeeeccccttttFFFFoooorrrreeeeggggrrrroooouuuunnnndddd options for the text widget are tied to the ----bbbbaaaacccckkkkggggrrrroooouuuunnnndddd,
  679.      ----bbbboooorrrrddddeeeerrrrwwwwiiiiddddtttthhhh, and ----ffffoooorrrreeeeggggrrrroooouuuunnnndddd options for the sssseeeellll tag:  changes in either
  680.      will automatically be reflected in the other.
  681.  
  682.  
  683. TTTTHHHHEEEE IIIINNNNSSSSEEEERRRRTTTTIIIIOOOONNNN CCCCUUUURRRRSSSSOOOORRRR
  684.      The mark named iiiinnnnsssseeeerrrrtttt has special significance in text widgets.  It is
  685.      defined automatically when a text widget is created and it may not be
  686.      unset with the ``_p_a_t_h_N_a_m_e mmmmaaaarrrrkkkk uuuunnnnsssseeeetttt'' widget command.  The iiiinnnnsssseeeerrrrtttt mark
  687.      represents the position of the insertion cursor, and the insertion cursor
  688.      will automatically be drawn at this point whenever the text widget has
  689.      the input focus.
  690.  
  691.  
  692. WWWWIIIIDDDDGGGGEEEETTTT CCCCOOOOMMMMMMMMAAAANNNNDDDD
  693.      The tttteeeexxxxtttt command creates a new Tcl command whose name is the same as the
  694.      path name of the text's window.  This command may be used to invoke
  695.      various operations on the widget.  It has the following general form:
  696.  
  697.           _p_a_t_h_N_a_m_e _o_p_t_i_o_n ?_a_r_g _a_r_g ...?
  698.  
  699.      _P_a_t_h_N_a_m_e is the name of the command, which is the same as the text
  700.      widget's path name.  _O_p_t_i_o_n and the _a_r_gs determine the exact behavior of
  701.      the command.  The following commands are possible for text widgets:
  702.  
  703.      _p_a_t_h_N_a_m_e bbbbbbbbooooxxxx _i_n_d_e_x
  704.           Returns a list of four elements describing the screen area of the   |
  705.           character given by _i_n_d_e_x.  The first two elements of the list give  |
  706.           the x and y coordinates of the upper-left corner of the area        |
  707.           occupied by the character, and the last two elements give the width |
  708.           and height of the area.  If the character is only partially visible |
  709.           on the screen, then the return value reflects just the visible part.|
  710.           If the character is not visible on the screen then the return value |
  711.           is an empty list.
  712.  
  713.      _p_a_t_h_N_a_m_e ccccggggeeeetttt _o_p_t_i_o_n
  714.           Returns the current value of the configuration option given by      |
  715.           _o_p_t_i_o_n.  _O_p_t_i_o_n may have any of the values accepted by the tttteeeexxxxtttt     |
  716.           command.
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  731.  
  732.  
  733.  
  734.      _p_a_t_h_N_a_m_e ccccoooommmmppppaaaarrrreeee _i_n_d_e_x_1 _o_p _i_n_d_e_x_2
  735.           Compares the indices given by _i_n_d_e_x_1 and _i_n_d_e_x_2 according to the
  736.           relational operator given by _o_p, and returns 1 if the relationship
  737.           is satisfied and 0 if it isn't.  _O_p must be one of the operators <,
  738.           <=, ==, >=, >, or !=.  If _o_p is == then 1 is returned if the two
  739.           indices refer to the same character, if _o_p is < then 1 is returned
  740.           if _i_n_d_e_x_1 refers to an earlier character in the text than _i_n_d_e_x_2,
  741.           and so on.
  742.  
  743.      _p_a_t_h_N_a_m_e ccccoooonnnnffffiiiigggguuuurrrreeee ?_o_p_t_i_o_n? ?_v_a_l_u_e _o_p_t_i_o_n _v_a_l_u_e ...?
  744.           Query or modify the configuration options of the widget.  If no
  745.           _o_p_t_i_o_n is specified, returns a list describing all of the available
  746.           options for _p_a_t_h_N_a_m_e (see TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo for information on the
  747.           format of this list).  If _o_p_t_i_o_n is specified with no _v_a_l_u_e, then
  748.           the command returns a list describing the one named option (this
  749.           list will be identical to the corresponding sublist of the value
  750.           returned if no _o_p_t_i_o_n is specified).  If one or more _o_p_t_i_o_n-_v_a_l_u_e
  751.           pairs are specified, then the command modifies the given widget
  752.           option(s) to have the given value(s);  in this case the command
  753.           returns an empty string.  _O_p_t_i_o_n may have any of the values accepted
  754.           by the tttteeeexxxxtttt command.
  755.  
  756.      _p_a_t_h_N_a_m_e ddddeeeebbbbuuuugggg ?_b_o_o_l_e_a_n?
  757.           If _b_o_o_l_e_a_n is specified, then it must have one of the true or false
  758.           values accepted by Tcl_GetBoolean.  If the value is a true one then
  759.           internal consistency checks will be turned on in the B-tree code
  760.           associated with text widgets.  If _b_o_o_l_e_a_n has a false value then the
  761.           debugging checks will be turned off.  In either case the command
  762.           returns an empty string.  If _b_o_o_l_e_a_n is not specified then the
  763.           command returns oooonnnn or ooooffffffff to indicate whether or not debugging is
  764.           turned on.  There is a single debugging switch shared by all text
  765.           widgets:  turning debugging on or off in any widget turns it on or
  766.           off for all widgets.  For widgets with large amounts of text, the
  767.           consistency checks may cause a noticeable slow-down.
  768.  
  769.      _p_a_t_h_N_a_m_e ddddeeeelllleeeetttteeee _i_n_d_e_x_1 ?_i_n_d_e_x_2?
  770.           Delete a range of characters from the text.  If both _i_n_d_e_x_1 and
  771.           _i_n_d_e_x_2 are specified, then delete all the characters starting with
  772.           the one given by _i_n_d_e_x_1 and stopping just before _i_n_d_e_x_2 (i.e. the
  773.           character at _i_n_d_e_x_2 is not deleted).  If _i_n_d_e_x_2 doesn't specify a
  774.           position later in the text than _i_n_d_e_x_1 then no characters are
  775.           deleted.  If _i_n_d_e_x_2 isn't specified then the single character at
  776.           _i_n_d_e_x_1 is deleted.  It is not allowable to delete characters in a
  777.           way that would leave the text without a newline as the last
  778.           character.  The command returns an empty string.
  779.  
  780.      _p_a_t_h_N_a_m_e ddddlllliiiinnnneeeeiiiinnnnffffoooo _i_n_d_e_x
  781.           Returns a list with five elements describing the area occupied by   |
  782.           the display line containing _i_n_d_e_x.  The first two elements of the   |
  783.           list give the x and y coordinates of the upper-left corner of the   |
  784.           area occupied by the line, the third and fourth elements give the   |
  785.           width and height of the area, and the fifth element gives the       |
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  797.  
  798.  
  799.  
  800.           position of the baseline for the line, measured down from the top of|
  801.           the area.  All of this information is measured in pixels.  If the   |
  802.           current wrap mode is nnnnoooonnnneeee and the line extends beyond the boundaries|
  803.           of the window, the area returned reflects the entire area of the    |
  804.           line, including the portions that are out of the window.  If the    |
  805.           line is shorter than the full width of the window then the area     |
  806.           returned reflects just the portion of the line that is occupied by  |
  807.           characters and embedded windows.  If the display line containing    |
  808.           _i_n_d_e_x is not visible on the screen then the return value is an empty|
  809.           list.
  810.  
  811.      _p_a_t_h_N_a_m_e ggggeeeetttt _i_n_d_e_x_1 ?_i_n_d_e_x_2?
  812.           Return a range of characters from the text.  The return value will
  813.           be all the characters in the text starting with the one whose index
  814.           is _i_n_d_e_x_1 and ending just before the one whose index is _i_n_d_e_x_2 (the
  815.           character at _i_n_d_e_x_2 will not be returned).  If _i_n_d_e_x_2 is omitted
  816.           then the single character at _i_n_d_e_x_1 is returned.  If there are no
  817.           characters in the specified range (e.g. _i_n_d_e_x_1 is past the end of
  818.           the file or _i_n_d_e_x_2 is less than or equal to _i_n_d_e_x_1) then an empty
  819.           string is returned.  If the specified range contains embedded       |
  820.           windows, no information about them is included in the returned      |
  821.           string.
  822.  
  823.      _p_a_t_h_N_a_m_e iiiinnnnddddeeeexxxx _i_n_d_e_x
  824.           Returns the position corresponding to _i_n_d_e_x in the form _l_i_n_e._c_h_a_r
  825.           where _l_i_n_e is the line number and _c_h_a_r is the character number.
  826.           _I_n_d_e_x may have any of the forms described under INDICES above.
  827.  
  828.      _p_a_t_h_N_a_m_e iiiinnnnsssseeeerrrrtttt _i_n_d_e_x _c_h_a_r_s ?_t_a_g_L_i_s_t _c_h_a_r_s _t_a_g_L_i_s_t ...?
  829.           Inserts all of the _c_h_a_r_s arguments just before the character at
  830.           _i_n_d_e_x.  If _i_n_d_e_x refers to the end of the text (the character after |
  831.           the last newline) then the new text is inserted just before the last|
  832.           newline instead.  If there is a single _c_h_a_r_s argument and no        |
  833.           _t_a_g_L_i_s_t, then the new text will receive any tags that are present on|
  834.           both the character before and the character after the insertion     |
  835.           point; if a tag is present on only one of these characters then it  |
  836.           will not be applied to the new text.  If _t_a_g_L_i_s_t is specified then  |
  837.           it consists of a list of tag names;  the new characters will receive|
  838.           all of the tags in this list and no others, regardless of the tags  |
  839.           present around the insertion point.  If multiple _c_h_a_r_s-_t_a_g_L_i_s_t      |
  840.           argument pairs are present, they produce the same effect as if a    |
  841.           separate iiiinnnnsssseeeerrrrtttt widget command had been issued for each pair, in    |
  842.           order.  The last _t_a_g_L_i_s_t argument may be omitted.
  843.  
  844.      _p_a_t_h_N_a_m_e mmmmaaaarrrrkkkk _o_p_t_i_o_n ?_a_r_g _a_r_g ...?
  845.           This command is used to manipulate marks.  The exact behavior of the
  846.           command depends on the _o_p_t_i_o_n argument that follows the mmmmaaaarrrrkkkk
  847.           argument.  The following forms of the command are currently
  848.           supported:
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.                                                                        PPPPaaaaggggeeee 11113333
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  863.  
  864.  
  865.  
  866.           _p_a_t_h_N_a_m_e mmmmaaaarrrrkkkk ggggrrrraaaavvvviiiittttyyyy _m_a_r_k_N_a_m_e ?_d_i_r_e_c_t_i_o_n?
  867.                If _d_i_r_e_c_t_i_o_n is not specified, returns lllleeeefffftttt or rrrriiiigggghhhhtttt to        |
  868.                indicate which of its adjacent characters _m_a_r_k_N_a_m_e is attached |
  869.                to.  If _d_i_r_e_c_t_i_o_n is specified, it must be lllleeeefffftttt or rrrriiiigggghhhhtttt; the  |
  870.                gravity of _m_a_r_k_N_a_m_e is set to the given value.
  871.  
  872.           _p_a_t_h_N_a_m_e mmmmaaaarrrrkkkk nnnnaaaammmmeeeessss
  873.                Returns a list whose elements are the names of all the marks
  874.                that are currently set.
  875.  
  876.           _p_a_t_h_N_a_m_e mmmmaaaarrrrkkkk sssseeeetttt _m_a_r_k_N_a_m_e _i_n_d_e_x
  877.                Sets the mark named _m_a_r_k_N_a_m_e to a position just before the
  878.                character at _i_n_d_e_x.  If _m_a_r_k_N_a_m_e already exists, it is moved
  879.                from its old position; if it doesn't exist, a new mark is
  880.                created.  This command returns an empty string.
  881.  
  882.           _p_a_t_h_N_a_m_e mmmmaaaarrrrkkkk uuuunnnnsssseeeetttt _m_a_r_k_N_a_m_e ?_m_a_r_k_N_a_m_e _m_a_r_k_N_a_m_e ...?
  883.                Remove the mark corresponding to each of the _m_a_r_k_N_a_m_e
  884.                arguments.  The removed marks will not be usable in indices and
  885.                will not be returned by future calls to ``_p_a_t_h_N_a_m_e mmmmaaaarrrrkkkk
  886.                nnnnaaaammmmeeeessss''.  This command returns an empty string.
  887.  
  888.      _p_a_t_h_N_a_m_e ssssccccaaaannnn _o_p_t_i_o_n _a_r_g_s
  889.           This command is used to implement scanning on texts.  It has two
  890.           forms, depending on _o_p_t_i_o_n:
  891.  
  892.           _p_a_t_h_N_a_m_e ssssccccaaaannnn mmmmaaaarrrrkkkk _x _y
  893.                Records _x and _y and the current view in the text window, for   |
  894.                use in conjunction with later ssssccccaaaannnn ddddrrrraaaaggggttttoooo commands.  Typically |
  895.                this command is associated with a mouse button press in the    |
  896.                widget.  It returns an empty string.
  897.  
  898.           _p_a_t_h_N_a_m_e ssssccccaaaannnn ddddrrrraaaaggggttttoooo _x _y
  899.                This command computes the difference between its _x and _y       |
  900.                arguments and the _x and _y arguments to the last ssssccccaaaannnn mmmmaaaarrrrkkkk      |
  901.                command for the widget.  It then adjusts the view by 10 times  |
  902.                the difference in coordinates.  This command is typically
  903.                associated with mouse motion events in the widget, to produce
  904.                the effect of dragging the text at high speed through the
  905.                window.  The return value is an empty string.
  906.  
  907.      _p_a_t_h_N_a_m_e sssseeeeaaaarrrrcccchhhh ?_s_w_i_t_c_h_e_s? _p_a_t_t_e_r_n _i_n_d_e_x ?_s_t_o_p_I_n_d_e_x?
  908.           Searches the text in _p_a_t_h_N_a_m_e starting at _i_n_d_e_x for a range of      |
  909.           characters that matches _p_a_t_t_e_r_n.  If a match is found, the index of |
  910.           the first character in the match is returned as result;  otherwise  |
  911.           an empty string is returned.  One or more of the following switches |
  912.           (or abbreviations thereof) may be specified to control the search:
  913.  
  914.           ----ffffoooorrrrwwwwaaaarrrrddddssss
  915.                The search will proceed forward through the text, finding the
  916.                first matching range starting at a position later than _i_n_d_e_x.
  917.                This is the default.
  918.  
  919.  
  920.  
  921.                                                                        PPPPaaaaggggeeee 11114444
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  929.  
  930.  
  931.  
  932.           ----bbbbaaaacccckkkkwwwwaaaarrrrddddssss
  933.                The search will proceed backward through the text, finding the
  934.                matching range closest to _i_n_d_e_x whose first character is before
  935.                _i_n_d_e_x.
  936.  
  937.           ----eeeexxxxaaaacccctttt
  938.                Use exact matching:  the characters in the matching range must
  939.                be identical to those in _p_a_t_t_e_r_n.  This is the default.
  940.  
  941.           ----rrrreeeeggggeeeexxxxpppp
  942.                Treat _p_a_t_t_e_r_n as a regular expression and match it against the
  943.                text using the rules for regular expressions (see the rrrreeeeggggeeeexxxxpppp
  944.                command for details).
  945.  
  946.           ----nnnnooooccccaaaasssseeee
  947.                Ignore case differences between the pattern and the text.
  948.  
  949.           ----ccccoooouuuunnnntttt _v_a_r_N_a_m_e
  950.                The argument following ----ccccoooouuuunnnntttt gives the name of a variable; if
  951.                a match is found, the number of characters in the matching
  952.                range will be stored in the variable.
  953.  
  954.           --------   This switch has no effect except to terminate the list of
  955.                switches:  the next argument will be treated as _p_a_t_t_e_r_n even if
  956.                it starts with ----.
  957.  
  958.           The matching range must be entirely within a single line of text.
  959.           For regular expression matching the newlines are removed from the
  960.           ends of the lines before matching:  use the $$$$ feature in regular
  961.           expressions to match the end of a line.  For exact matching the
  962.           newlines are retained.  If _s_t_o_p_I_n_d_e_x is specified, the search stops
  963.           at that index:  for forward searches, no match at or after _s_t_o_p_I_n_d_e_x
  964.           will be considered;  for backward searches, no match earlier in the
  965.           text than _s_t_o_p_I_n_d_e_x will be considered.  If _s_t_o_p_I_n_d_e_x is omitted,
  966.           the entire text will be searched:  when the beginning or end of the
  967.           text is reached, the search continues at the other end until the
  968.           starting location is reached again;  if _s_t_o_p_I_n_d_e_x is specified, no
  969.           wrap-around will occur.
  970.  
  971.      _p_a_t_h_N_a_m_e sssseeeeeeee _i_n_d_e_x
  972.           Adjusts the view in the window so that the character given by _i_n_d_e_x |
  973.           is completely visible.  If _i_n_d_e_x is already visible then the command|
  974.           does nothing.  If _i_n_d_e_x is a short distance out of view, the command|
  975.           adjusts the view just enough to make _i_n_d_e_x visible at the edge of   |
  976.           the window.  If _i_n_d_e_x is far out of view, then the command centers  |
  977.           _i_n_d_e_x in the window.
  978.  
  979.      _p_a_t_h_N_a_m_e ttttaaaagggg _o_p_t_i_o_n ?_a_r_g _a_r_g ...?
  980.           This command is used to manipulate tags.  The exact behavior of the
  981.           command depends on the _o_p_t_i_o_n argument that follows the ttttaaaagggg
  982.           argument.  The following forms of the command are currently
  983.           supported:
  984.  
  985.  
  986.  
  987.                                                                        PPPPaaaaggggeeee 11115555
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  995.  
  996.  
  997.  
  998.           _p_a_t_h_N_a_m_e ttttaaaagggg aaaadddddddd _t_a_g_N_a_m_e _i_n_d_e_x_1 ?_i_n_d_e_x_2 _i_n_d_e_x_1 _i_n_d_e_x_2 ...?
  999.                Associate the tag _t_a_g_N_a_m_e with all of the characters starting
  1000.                with _i_n_d_e_x_1 and ending just before _i_n_d_e_x_2 (the character at
  1001.                _i_n_d_e_x_2 isn't tagged).  A single command may contain any number |
  1002.                of _i_n_d_e_x_1-_i_n_d_e_x_2 pairs.  If the last _i_n_d_e_x_2 is omitted then the|
  1003.                single character at _i_n_d_e_x_1 is tagged.  If there are no
  1004.                characters in the specified range (e.g. _i_n_d_e_x_1 is past the end
  1005.                of the file or _i_n_d_e_x_2 is less than or equal to _i_n_d_e_x_1) then the
  1006.                command has no effect.
  1007.  
  1008.           _p_a_t_h_N_a_m_e ttttaaaagggg bbbbiiiinnnndddd _t_a_g_N_a_m_e ?_s_e_q_u_e_n_c_e? ?_s_c_r_i_p_t?
  1009.                This command associates _s_c_r_i_p_t with the tag given by _t_a_g_N_a_m_e.
  1010.                Whenever the event sequence given by _s_e_q_u_e_n_c_e occurs for a
  1011.                character that has been tagged with _t_a_g_N_a_m_e, the script will be
  1012.                invoked.  This widget command is similar to the bbbbiiiinnnndddd command
  1013.                except that it operates on characters in a text rather than
  1014.                entire widgets.  See the bbbbiiiinnnndddd manual entry for complete details
  1015.                on the syntax of _s_e_q_u_e_n_c_e and the substitutions performed on
  1016.                _s_c_r_i_p_t before invoking it.  If all arguments are specified then
  1017.                a new binding is created, replacing any existing binding for
  1018.                the same _s_e_q_u_e_n_c_e and _t_a_g_N_a_m_e (if the first character of _s_c_r_i_p_t
  1019.                is ``+'' then _s_c_r_i_p_t augments an existing binding rather than
  1020.                replacing it).  In this case the return value is an empty
  1021.                string.  If _s_c_r_i_p_t is omitted then the command returns the
  1022.                _s_c_r_i_p_t associated with _t_a_g_N_a_m_e and _s_e_q_u_e_n_c_e (an error occurs if
  1023.                there is no such binding).  If both _s_c_r_i_p_t and _s_e_q_u_e_n_c_e are
  1024.                omitted then the command returns a list of all the sequences
  1025.                for which bindings have been defined for _t_a_g_N_a_m_e.
  1026.  
  1027.                The only events for which bindings may be specified are those
  1028.                related to the mouse and keyboard, such as EEEEnnnntttteeeerrrr, LLLLeeeeaaaavvvveeee,
  1029.                BBBBuuuuttttttttoooonnnnPPPPrrrreeeessssssss, MMMMoooottttiiiioooonnnn, and KKKKeeeeyyyyPPPPrrrreeeessssssss.  Event bindings for a text
  1030.                widget use the ccccuuuurrrrrrrreeeennnntttt mark described under MARKS above.  An   |
  1031.                EEEEnnnntttteeeerrrr event triggers for a tag when the tag first becomes      |
  1032.                present on the current character, and a LLLLeeeeaaaavvvveeee event triggers   |
  1033.                for a tag when it ceases to be present on the current          |
  1034.                character.  EEEEnnnntttteeeerrrr and LLLLeeeeaaaavvvveeee events can happen either because   |
  1035.                the ccccuuuurrrrrrrreeeennnntttt mark moved or because the character at that        |
  1036.                position changed.  Note that these events are different than   |
  1037.                EEEEnnnntttteeeerrrr and LLLLeeeeaaaavvvveeee events for windows.  Mouse and keyboard events |
  1038.                are directed to the current character.                         |
  1039.  
  1040.                It is possible for the current character to have multiple tags,|
  1041.                and for each of them to have a binding for a particular event  |
  1042.                sequence.  When this occurs, one binding is invoked for each   |
  1043.                tag, in order from lowest-priority to highest priority.  If    |
  1044.                there are multiple matching bindings for a single tag, then the|
  1045.                most specific binding is chosen (see the manual entry for the  |
  1046.                bbbbiiiinnnndddd command for details).  ccccoooonnnnttttiiiinnnnuuuueeee and bbbbrrrreeeeaaaakkkk commands within |
  1047.                binding scripts are processed in the same way as for bindings  |
  1048.                created with the bbbbiiiinnnndddd command.                                 |
  1049.  
  1050.  
  1051.  
  1052.  
  1053.                                                                        PPPPaaaaggggeeee 11116666
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  1061.  
  1062.  
  1063.  
  1064.                If bindings are created for the widget as a whole using the    |
  1065.                bbbbiiiinnnndddd command, then those bindings will supplement the tag      |
  1066.                bindings.  The tag bindings will be invoked first, followed by |
  1067.                bindings for the window as a whole.
  1068.  
  1069.           _p_a_t_h_N_a_m_e ttttaaaagggg ccccggggeeeetttt _t_a_g_N_a_m_e _o_p_t_i_o_n
  1070.                This command returns the current value of the option named     |
  1071.                _o_p_t_i_o_n associated with the tag given by _t_a_g_N_a_m_e.  _O_p_t_i_o_n may   |
  1072.                have any of the values accepted by the ttttaaaagggg ccccoooonnnnffffiiiigggguuuurrrreeee widget    |
  1073.                command.
  1074.  
  1075.           _p_a_t_h_N_a_m_e ttttaaaagggg ccccoooonnnnffffiiiigggguuuurrrreeee _t_a_g_N_a_m_e ?_o_p_t_i_o_n? ?_v_a_l_u_e? ?_o_p_t_i_o_n _v_a_l_u_e ...?
  1076.                This command is similar to the ccccoooonnnnffffiiiigggguuuurrrreeee widget command except
  1077.                that it modifies options associated with the tag given by
  1078.                _t_a_g_N_a_m_e instead of modifying options for the overall text
  1079.                widget.  If no _o_p_t_i_o_n is specified, the command returns a list
  1080.                describing all of the available options for _t_a_g_N_a_m_e (see
  1081.                TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo for information on the format of this list).
  1082.                If _o_p_t_i_o_n is specified with no _v_a_l_u_e, then the command returns
  1083.                a list describing the one named option (this list will be
  1084.                identical to the corresponding sublist of the value returned if
  1085.                no _o_p_t_i_o_n is specified).  If one or more _o_p_t_i_o_n-_v_a_l_u_e pairs are
  1086.                specified, then the command modifies the given option(s) to
  1087.                have the given value(s) in _t_a_g_N_a_m_e; in this case the command
  1088.                returns an empty string.  See TAGS above for details on the
  1089.                options available for tags.
  1090.  
  1091.           _p_a_t_h_N_a_m_e ttttaaaagggg ddddeeeelllleeeetttteeee _t_a_g_N_a_m_e ?_t_a_g_N_a_m_e ...?
  1092.                Deletes all tag information for each of the _t_a_g_N_a_m_e arguments.
  1093.                The command removes the tags from all characters in the file
  1094.                and also deletes any other information associated with the
  1095.                tags, such as bindings and display information.  The command
  1096.                returns an empty string.
  1097.  
  1098.           _p_a_t_h_N_a_m_e ttttaaaagggg lllloooowwwweeeerrrr _t_a_g_N_a_m_e ?_b_e_l_o_w_T_h_i_s?
  1099.                Changes the priority of tag _t_a_g_N_a_m_e so that it is just lower in
  1100.                priority than the tag whose name is _b_e_l_o_w_T_h_i_s.  If _b_e_l_o_w_T_h_i_s is
  1101.                omitted, then _t_a_g_N_a_m_e's priority is changed to make it lowest
  1102.                priority of all tags.
  1103.  
  1104.           _p_a_t_h_N_a_m_e ttttaaaagggg nnnnaaaammmmeeeessss ?_i_n_d_e_x?
  1105.                Returns a list whose elements are the names of all the tags
  1106.                that are active at the character position given by _i_n_d_e_x.  If
  1107.                _i_n_d_e_x is omitted, then the return value will describe all of
  1108.                the tags that exist for the text (this includes all tags that
  1109.                have been named in a ``_p_a_t_h_N_a_m_e ttttaaaagggg'' widget command but
  1110.                haven't been deleted by a ``_p_a_t_h_N_a_m_e ttttaaaagggg ddddeeeelllleeeetttteeee'' widget
  1111.                command, even if no characters are currently marked with the
  1112.                tag).  The list will be sorted in order from lowest priority to
  1113.                highest priority.
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.                                                                        PPPPaaaaggggeeee 11117777
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  1127.  
  1128.  
  1129.  
  1130.           _p_a_t_h_N_a_m_e ttttaaaagggg nnnneeeexxxxttttrrrraaaannnnggggeeee _t_a_g_N_a_m_e _i_n_d_e_x_1 ?_i_n_d_e_x_2?
  1131.                This command searches the text for a range of characters tagged
  1132.                with _t_a_g_N_a_m_e where the first character of the range is no
  1133.                earlier than the character at _i_n_d_e_x_1 and no later than the
  1134.                character just before _i_n_d_e_x_2 (a range starting at _i_n_d_e_x_2 will
  1135.                not be considered).  If several matching ranges exist, the
  1136.                first one is chosen.  The command's return value is a list
  1137.                containing two elements, which are the index of the first
  1138.                character of the range and the index of the character just
  1139.                after the last one in the range.  If no matching range is found
  1140.                then the return value is an empty string.  If _i_n_d_e_x_2 is not
  1141.                given then it defaults to the end of the text.
  1142.  
  1143.           _p_a_t_h_N_a_m_e ttttaaaagggg rrrraaaaiiiisssseeee _t_a_g_N_a_m_e ?_a_b_o_v_e_T_h_i_s?
  1144.                Changes the priority of tag _t_a_g_N_a_m_e so that it is just higher
  1145.                in priority than the tag whose name is _a_b_o_v_e_T_h_i_s.  If _a_b_o_v_e_T_h_i_s
  1146.                is omitted, then _t_a_g_N_a_m_e's priority is changed to make it
  1147.                highest priority of all tags.
  1148.  
  1149.           _p_a_t_h_N_a_m_e ttttaaaagggg rrrraaaannnnggggeeeessss _t_a_g_N_a_m_e
  1150.                Returns a list describing all of the ranges of text that have
  1151.                been tagged with _t_a_g_N_a_m_e.  The first two elements of the list
  1152.                describe the first tagged range in the text, the next two
  1153.                elements describe the second range, and so on.  The first
  1154.                element of each pair contains the index of the first character
  1155.                of the range, and the second element of the pair contains the
  1156.                index of the character just after the last one in the range.
  1157.                If there are no characters tagged with _t_a_g then an empty string
  1158.                is returned.
  1159.  
  1160.           _p_a_t_h_N_a_m_e ttttaaaagggg rrrreeeemmmmoooovvvveeee _t_a_g_N_a_m_e _i_n_d_e_x_1 ?_i_n_d_e_x_2 _i_n_d_e_x_1 _i_n_d_e_x_2 ...?
  1161.                Remove the tag _t_a_g_N_a_m_e from all of the characters starting at
  1162.                _i_n_d_e_x_1 and ending just before _i_n_d_e_x_2 (the character at _i_n_d_e_x_2
  1163.                isn't affected).  A single command may contain any number of   |
  1164.                _i_n_d_e_x_1-_i_n_d_e_x_2 pairs.  If the last _i_n_d_e_x_2 is omitted then the   |
  1165.                single character at _i_n_d_e_x_1 is tagged.  If there are no
  1166.                characters in the specified range (e.g. _i_n_d_e_x_1 is past the end
  1167.                of the file or _i_n_d_e_x_2 is less than or equal to _i_n_d_e_x_1) then the
  1168.                command has no effect.  This command returns an empty string.
  1169.  
  1170.      _p_a_t_h_N_a_m_e wwwwiiiinnnnddddoooowwww _o_p_t_i_o_n ?_a_r_g _a_r_g ...?
  1171.           This command is used to manipulate embedded windows.  The behavior  |
  1172.           of the command depends on the _o_p_t_i_o_n argument that follows the ttttaaaagggg  |
  1173.           argument.  The following forms of the command are currently         |
  1174.           supported:
  1175.  
  1176.           _p_a_t_h_N_a_m_e wwwwiiiinnnnddddoooowwww ccccggggeeeetttt _i_n_d_e_x _o_p_t_i_o_n
  1177.                Returns the value of a configuration option for an embedded
  1178.                window.  _I_n_d_e_x identifies the embedded window, and _o_p_t_i_o_n
  1179.                specifies a particular configuration option, which must be one
  1180.                of the ones listed in the section EMBEDDED WINDOWS.
  1181.  
  1182.  
  1183.  
  1184.  
  1185.                                                                        PPPPaaaaggggeeee 11118888
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  1193.  
  1194.  
  1195.  
  1196.           _p_a_t_h_N_a_m_e wwwwiiiinnnnddddoooowwww ccccoooonnnnffffiiiigggguuuurrrreeee _i_n_d_e_x ?_o_p_t_i_o_n _v_a_l_u_e ...?
  1197.                Query or modify the configuration options for an embedded
  1198.                window.  If no _o_p_t_i_o_n is specified, returns a list describing
  1199.                all of the available options for the embedded window at _i_n_d_e_x
  1200.                (see TTTTkkkk____CCCCoooonnnnffffiiiigggguuuurrrreeeeIIIInnnnffffoooo for information on the format of this
  1201.                list).  If _o_p_t_i_o_n is specified with no _v_a_l_u_e, then the command
  1202.                returns a list describing the one named option (this list will
  1203.                be identical to the corresponding sublist of the value returned
  1204.                if no _o_p_t_i_o_n is specified).  If one or more _o_p_t_i_o_n-_v_a_l_u_e pairs
  1205.                are specified, then the command modifies the given option(s) to
  1206.                have the given value(s);  in this case the command returns an
  1207.                empty string.  See EMBEDDED WINDOWS for information on the
  1208.                options that are supported.
  1209.  
  1210.           _p_a_t_h_N_a_m_e wwwwiiiinnnnddddoooowwww ccccrrrreeeeaaaatttteeee _i_n_d_e_x ?_o_p_t_i_o_n _v_a_l_u_e ...?
  1211.                This command creates a new window annotation, which will appear
  1212.                in the text at the position given by _i_n_d_e_x.  Any number of
  1213.                _o_p_t_i_o_n-_v_a_l_u_e pairs may be specified to configure the
  1214.                annotation.  See EMBEDDED WINDOWS for information on the
  1215.                options that are supported.  Returns an empty string.
  1216.  
  1217.           _p_a_t_h_N_a_m_e wwwwiiiinnnnddddoooowwww nnnnaaaammmmeeeessss
  1218.                Returns a list whose elements are the names of all windows
  1219.                currently embedded in _w_i_n_d_o_w.
  1220.  
  1221.      _p_a_t_h_N_a_m_e xxxxvvvviiiieeeewwww _o_p_t_i_o_n _a_r_g_s
  1222.           This command is used to query and change the horizontal position of
  1223.           the text in the widget's window.  It can take any of the following
  1224.           forms:
  1225.  
  1226.           _p_a_t_h_N_a_m_e xxxxvvvviiiieeeewwww
  1227.                Returns a list containing two elements.  Each element is a real
  1228.                fraction between 0 and 1;  together they describe the portion
  1229.                of the document's horizontal span that is visible in the
  1230.                window.  For example, if the first element is .2 and the second
  1231.                element is .6, 20% of the text is off-screen to the left, the
  1232.                middle 40% is visible in the window, and 40% of the text is
  1233.                off-screen to the right.  The fractions refer only to the lines
  1234.                that are actually visible in the window:  if the lines in the
  1235.                window are all very short, so that they are entirely visible,
  1236.                the returned fractions will be 0 and 1, even if there are other
  1237.                lines in the text that are much wider than the window.  These
  1238.                are the same values passed to scrollbars via the
  1239.                ----xxxxssssccccrrrroooollllllllccccoooommmmmmmmaaaannnndddd option.
  1240.  
  1241.           _p_a_t_h_N_a_m_e xxxxvvvviiiieeeewwww mmmmoooovvvveeeettttoooo _f_r_a_c_t_i_o_n
  1242.                Adjusts the view in the window so that _f_r_a_c_t_i_o_n of the
  1243.                horizontal span of the text is off-screen to the left.
  1244.                _F_r_a_c_t_i_o_n is a fraction between 0 and 1.
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.                                                                        PPPPaaaaggggeeee 11119999
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  1259.  
  1260.  
  1261.  
  1262.           _p_a_t_h_N_a_m_e xxxxvvvviiiieeeewwww ssssccccrrrroooollllllll _n_u_m_b_e_r _w_h_a_t
  1263.                This command shifts the view in the window left or right
  1264.                according to _n_u_m_b_e_r and _w_h_a_t.  _N_u_m_b_e_r must be an integer.  _W_h_a_t
  1265.                must be either uuuunnnniiiittttssss or ppppaaaaggggeeeessss or an abbreviation of one of
  1266.                these.  If _w_h_a_t is uuuunnnniiiittttssss, the view adjusts left or right by
  1267.                _n_u_m_b_e_r average-width characters on the display;  if it is ppppaaaaggggeeeessss
  1268.                then the view adjusts by _n_u_m_b_e_r screenfuls.  If _n_u_m_b_e_r is
  1269.                negative then characters farther to the left become visible;
  1270.                if it is positive then characters farther to the right become
  1271.                visible.
  1272.  
  1273.      _p_a_t_h_N_a_m_e yyyyvvvviiiieeeewwww ?_a_r_g_s?
  1274.           This command is used to query and change the vertical position of
  1275.           the text in the widget's window.  It can take any of the following
  1276.           forms:
  1277.  
  1278.           _p_a_t_h_N_a_m_e yyyyvvvviiiieeeewwww
  1279.                Returns a list containing two elements, both of which are real
  1280.                fractions between 0 and 1.  The first element gives the
  1281.                position of the first character in the top line in the window,
  1282.                relative to the text as a whole (0.5 means it is halfway
  1283.                through the text, for example).  The second element gives the
  1284.                position of the character just after the last one in the bottom
  1285.                line of the window, relative to the text as a whole.  These are
  1286.                the same values passed to scrollbars via the ----yyyyssssccccrrrroooollllllllccccoooommmmmmmmaaaannnndddd
  1287.                option.
  1288.  
  1289.           _p_a_t_h_N_a_m_e yyyyvvvviiiieeeewwww mmmmoooovvvveeeettttoooo _f_r_a_c_t_i_o_n
  1290.                Adjusts the view in the window so that the character given by
  1291.                _f_r_a_c_t_i_o_n appears on the top line of the window.  _F_r_a_c_t_i_o_n is a
  1292.                fraction between 0 and 1;  0 indicates the first character in
  1293.                the text, 0.33 indicates the character one-third the way
  1294.                through the text, and so on.
  1295.  
  1296.           _p_a_t_h_N_a_m_e yyyyvvvviiiieeeewwww ssssccccrrrroooollllllll _n_u_m_b_e_r _w_h_a_t
  1297.                This command adjust the view in the window up or down according
  1298.                to _n_u_m_b_e_r and _w_h_a_t.  _N_u_m_b_e_r must be an integer.  _W_h_a_t must be
  1299.                either uuuunnnniiiittttssss or ppppaaaaggggeeeessss.  If _w_h_a_t is uuuunnnniiiittttssss, the view adjusts up
  1300.                or down by _n_u_m_b_e_r lines on the display;  if it is ppppaaaaggggeeeessss then
  1301.                the view adjusts by _n_u_m_b_e_r screenfuls.  If _n_u_m_b_e_r is negative
  1302.                then earlier positions in the text become visible;  if it is
  1303.                positive then later positions in the text become visible.
  1304.  
  1305.           _p_a_t_h_N_a_m_e yyyyvvvviiiieeeewwww ?----ppppiiiicccckkkkppppllllaaaacccceeee? _i_n_d_e_x
  1306.                Changes the view in the widget's window to make _i_n_d_e_x visible.
  1307.                If the ----ppppiiiicccckkkkppppllllaaaacccceeee option isn't specified then _i_n_d_e_x will appear
  1308.                at the top of the window.  If ----ppppiiiicccckkkkppppllllaaaacccceeee is specified then the
  1309.                widget chooses where _i_n_d_e_x appears in the window:
  1310.  
  1311.                [1]  If _i_n_d_e_x is already visible somewhere in the window then
  1312.                     the command does nothing.
  1313.  
  1314.  
  1315.  
  1316.  
  1317.                                                                        PPPPaaaaggggeeee 22220000
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  1325.  
  1326.  
  1327.  
  1328.                [2]  If _i_n_d_e_x is only a few lines off-screen above the window
  1329.                     then it will be positioned at the top of the window.
  1330.  
  1331.                [3]  If _i_n_d_e_x is only a few lines off-screen below the window
  1332.                     then it will be positioned at the bottom of the window.
  1333.  
  1334.                [4]  Otherwise, _i_n_d_e_x will be centered in the window.
  1335.  
  1336.                The ----ppppiiiicccckkkkppppllllaaaacccceeee option has been obsoleted by the sssseeeeeeee widget
  1337.                command (sssseeeeeeee handles both x- and y-motion to make a location
  1338.                visible, whereas ----ppppiiiicccckkkkppppllllaaaacccceeee only handles motion in y).
  1339.  
  1340.           _p_a_t_h_N_a_m_e yyyyvvvviiiieeeewwww _n_u_m_b_e_r
  1341.                This command makes the first character on the line after the
  1342.                one given by _n_u_m_b_e_r visible at the top of the window.  _N_u_m_b_e_r
  1343.                must be an integer.  This command used to be used for
  1344.                scrolling, but now it is obsolete.
  1345.  
  1346.  
  1347. BBBBIIIINNNNDDDDIIIINNNNGGGGSSSS
  1348.      Tk automatically creates class bindings for texts that give them the
  1349.      following default behavior.  In the descriptions below, ``word'' refers  |
  1350.      to a contiguous group of letters, digits, or ``_'' characters, or any    |
  1351.      single character other than these.
  1352.  
  1353.      [1]  Clicking mouse button 1 positions the insertion cursor just before
  1354.           the character underneath the mouse cursor, sets the input focus to
  1355.           this widget, and clears any selection in the widget.  Dragging with
  1356.           mouse button 1 strokes out a selection between the insertion cursor
  1357.           and the character under the mouse.
  1358.  
  1359.      [2]  Double-clicking with mouse button 1 selects the word under the mouse
  1360.           and positions the insertion cursor at the beginning of the word.
  1361.           Dragging after a double click will stroke out a selection consisting
  1362.           of whole words.
  1363.  
  1364.      [3]  Triple-clicking with mouse button 1 selects the line under the mouse
  1365.           and positions the insertion cursor at the beginning of the line.
  1366.           Dragging after a triple click will stroke out a selection consisting
  1367.           of whole lines.
  1368.  
  1369.      [4]  The ends of the selection can be adjusted by dragging with mouse
  1370.           button 1 while the Shift key is down;  this will adjust the end of
  1371.           the selection that was nearest to the mouse cursor when button 1 was
  1372.           pressed.  If the button is double-clicked before dragging then the
  1373.           selection will be adjusted in units of whole words;  if it is
  1374.           triple-clicked then the selection will be adjusted in units of whole
  1375.           lines.
  1376.  
  1377.      [5]  Clicking mouse button 1 with the Control key down will reposition
  1378.           the insertion cursor without affecting the selection.
  1379.  
  1380.  
  1381.  
  1382.  
  1383.                                                                        PPPPaaaaggggeeee 22221111
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  1391.  
  1392.  
  1393.  
  1394.      [6]  If any normal printing characters are typed, they are inserted at
  1395.           the point of the insertion cursor.
  1396.  
  1397.      [7]  The view in the widget can be adjusted by dragging with mouse button
  1398.           2.  If mouse button 2 is clicked without moving the mouse, the
  1399.           selection is copied into the text at the position of the insertion
  1400.           cursor.  The Insert key also inserts the selection.
  1401.  
  1402.      [8]  If the mouse is dragged out of the widget while button 1 is pressed,
  1403.           the entry will automatically scroll to make more text visible (if
  1404.           there is more text off-screen on the side where the mouse left the
  1405.           window).
  1406.  
  1407.      [9]  The Left and Right keys move the insertion cursor one character to
  1408.           the left or right;  they also clear any selection in the text.  If
  1409.           Left or Right is typed with the Shift key down, then the insertion
  1410.           cursor moves and the selection is extended to include the new
  1411.           character.  Control-Left and Control-Right move the insertion cursor
  1412.           by words, and Control-Shift-Left and Control-Shift-Right move the
  1413.           insertion cursor by words and also extend the selection.  Control-b
  1414.           and Control-f behave the same as Left and Right, respectively.
  1415.           Meta-b and Meta-f behave the same as Control-Left and Control-Right,
  1416.           respectively.
  1417.  
  1418.      [10] The Up and Down keys move the insertion cursor one line up or down
  1419.           and clear any selection in the text.  If Up or Right is typed with
  1420.           the Shift key down, then the insertion cursor moves and the
  1421.           selection is extended to include the new character.  Control-Up and
  1422.           Control-Down move the insertion cursor by paragraphs (groups of
  1423.           lines separated by blank lines), and Control-Shift-Up and Control-
  1424.           Shift-Down move the insertion cursor by paragraphs and also extend
  1425.           the selection.  Control-p and Control-n behave the same as Up and
  1426.           Down, respectively.
  1427.  
  1428.      [11] The Next and Prior keys move the insertion cursor forward or
  1429.           backwards by one screenful and clear any selection in the text.  If
  1430.           the Shift key is held down while Next or Prior is typed, then the
  1431.           selection is extended to include the new character.  Control-v moves
  1432.           the view down one screenful without moving the insertion cursor or
  1433.           adjusting the selection.
  1434.  
  1435.      [12] Control-Next and Control-Prior scroll the view right or left by one
  1436.           page without moving the insertion cursor or affecting the selection.
  1437.  
  1438.      [13] Home and Control-a move the insertion cursor to the beginning of its
  1439.           line and clear any selection in the widget.  Shift-Home moves the
  1440.           insertion cursor to the beginning of the line and also extends the
  1441.           selection to that point.
  1442.  
  1443.      [14] End and Control-e move the insertion cursor to the end of the line
  1444.           and clear any selection in the widget.  Shift-End moves the cursor
  1445.           to the end of the line and extends the selection to that point.
  1446.  
  1447.  
  1448.  
  1449.                                                                        PPPPaaaaggggeeee 22222222
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  1457.  
  1458.  
  1459.  
  1460.      [15] Control-Home and Meta-< move the insertion cursor to the beginning
  1461.           of the text and clear any selection in the widget.  Control-Shift-
  1462.           Home moves the insertion cursor to the beginning of the text and
  1463.           also extends the selection to that point.
  1464.  
  1465.      [16] Control-End and Meta-> move the insertion cursor to the end of the
  1466.           text and clear any selection in the widget.  Control-Shift-End moves
  1467.           the cursor to the end of the text and extends the selection to that
  1468.           point.
  1469.  
  1470.      [17] The Select key and Control-Space set the selection anchor to the
  1471.           position of the insertion cursor.  They don't affect the current
  1472.           selection.  Shift-Select and Control-Shift-Space adjust the
  1473.           selection to the current position of the insertion cursor, selecting
  1474.           from the anchor to the insertion cursor if there was not any
  1475.           selection previously.
  1476.  
  1477.      [18] Control-/ selects the entire contents of the widget.
  1478.  
  1479.      [19] Control-\ clears any selection in the widget.
  1480.  
  1481.      [20] The F16 key (labelled Copy on many Sun workstations) or Meta-w
  1482.           copies the selection in the widget to the clipboard, if there is a
  1483.           selection.
  1484.  
  1485.      [21] The F20 key (labelled Cut on many Sun workstations) or Control-w
  1486.           copies the selection in the widget to the clipboard and deletes the
  1487.           selection.  If there is no selection in the widget then these keys
  1488.           have no effect.
  1489.  
  1490.      [22] The F18 key (labelled Paste on many Sun workstations) or Control-y
  1491.           inserts the contents of the clipboard at the position of the
  1492.           insertion cursor.
  1493.  
  1494.      [23] The Delete key deletes the selection, if there is one in the widget.
  1495.           If there is no selection, it deletes the character to the right of
  1496.           the insertion cursor.
  1497.  
  1498.      [24] Backspace and Control-h delete the selection, if there is one in the
  1499.           widget.  If there is no selection, they delete the character to the
  1500.           left of the insertion cursor.
  1501.  
  1502.      [25] Control-d deletes the character to the right of the insertion
  1503.           cursor.
  1504.  
  1505.      [26] Meta-d deletes the word to the right of the insertion cursor.
  1506.  
  1507.      [27] Control-k deletes from the insertion cursor to the end of its line;
  1508.           if the insertion cursor is already at the end of a line, then
  1509.           Control-k deletes the newline character.
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.                                                                        PPPPaaaaggggeeee 22223333
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. tttteeeexxxxtttt((((3333TTTTkkkk))))                                                            tttteeeexxxxtttt((((3333TTTTkkkk))))
  1523.  
  1524.  
  1525.  
  1526.      [28] Control-o opens a new line by inserting a newline character in front
  1527.           of the insertion cursor without moving the insertion cursor.
  1528.  
  1529.      [29] Meta-backspace and Meta-Delete delete the word to the left of the
  1530.           insertion cursor.
  1531.  
  1532.      [30] Control-x deletes whatever is selected in the text widget.
  1533.  
  1534.      [31] Control-t reverses the order of the two characters to the right of
  1535.           the insertion cursor.
  1536.  
  1537.      If the widget is disabled using the ----ssssttttaaaatttteeee option, then its view can
  1538.      still be adjusted and text can still be selected, but no insertion cursor
  1539.      will be displayed and no text modifications will take place.
  1540.  
  1541.      The behavior of texts can be changed by defining new bindings for
  1542.      individual widgets or by redefining the class bindings.
  1543.  
  1544.  
  1545. PPPPEEEERRRRFFFFOOOORRRRMMMMAAAANNNNCCCCEEEE IIIISSSSSSSSUUUUEEEESSSS
  1546.      Text widgets should run efficiently under a variety of conditions.  The
  1547.      text widget uses about 2-3 bytes of main memory for each byte of text, so
  1548.      texts containing a megabyte or more should be practical on most
  1549.      workstations.  Text is represented internally with a modified B-tree
  1550.      structure that makes operations relatively efficient even with large
  1551.      texts.  Tags are included in the B-tree structure in a way that allows
  1552.      tags to span large ranges or have many disjoint smaller ranges without
  1553.      loss of efficiency.  Marks are also implemented in a way that allows
  1554.      large numbers of marks.  The only known mode of operation where a text
  1555.      widget may not run efficiently is if it has a very large number of
  1556.      different tags.  Hundreds of tags should be fine, or even a thousand, but
  1557.      tens of thousands of tags will make texts consume a lot of memory and run
  1558.      slowly.
  1559.  
  1560.  
  1561. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  1562.      text, widget
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.                                                                        PPPPaaaaggggeeee 22224444
  1582.  
  1583.  
  1584.  
  1585.